﻿<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>Aragaki控制台</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<include file="common/tag"/>
		<style>
			body{
				overflow-y:hidden;
			}
		</style>
	</head>

	<body>
		<div class="navbar navbar-default" id="navbar">
			<script type="text/javascript">
				try{ace.settings.check('navbar' , 'fixed')}catch(e){}
			</script>

			<div class="navbar-container" id="navbar-container">
				<div class="navbar-header pull-left">
					<a href="#" class="navbar-brand">
						<small>
							<i class="icon-home"></i>
							SCP收容管理系统
						</small>
					</a><!-- /.brand -->
				</div><!-- /.navbar-header -->

				<div class="navbar-header pull-right" role="navigation">
					<ul class="nav ace-nav">

						<li class="light-blue">
							<a data-toggle="dropdown" href="#" class="dropdown-toggle">
								<img class="nav-user-photo" src="/static/images/profile.jpg" alt="Thaumiel's Photo" />
								<span class="user-info">
									<small>打上花火吧,</small>
									{$_SESSION["name"]}
								</span>

								<i class="icon-caret-down"></i>
							</a>

							<ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">

								<li>
									<a target="mframe" href="/index.php/admin/admin/profile">
										<i class="icon-user"></i>
										个人资料
									</a>
								</li>

								<li class="divider"></li>

								<li>
									<a href="logout">
										<i class="icon-off"></i>
										退出
									</a>
								</li>
							</ul>
						</li>
					</ul><!-- /.ace-nav -->
				</div><!-- /.navbar-header -->
			</div><!-- /.container -->
		</div>

		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>

			<div class="main-container-inner">
				<a class="menu-toggler" id="menu-toggler" href="#">
					<span class="menu-text"></span>
				</a>

				<div class="sidebar" id="sidebar">
					<script type="text/javascript">
						try{ace.settings.check('sidebar' , 'fixed')}catch(e){}
					</script>

					<ul class="nav nav-list">
						<li class="active">
							<a href="/index.php/admin/admin/controller" target="mframe">
								<i class="icon-globe"></i>
								<span class="menu-text"> 控制台 </span>
							</a>
						</li>

						<if condition="empty($data['Server']) eq false">
							<li>
								<a href="#" class="dropdown-toggle">
									<i class="icon-cog"></i>
									<span class="menu-text"> 服务监控 </span>

									<b class="arrow icon-angle-down"></b>
								</a>

								<ul class="submenu">
									<if condition="in_array('server_index',$data['Server']) eq true">
										<li>
											<a href="/index.php/admin/server/server_index" target="mframe">
												<i class="icon-double-angle-right"></i>
												实时监控
											</a>
										</li>
									</if>
								</ul>

							</li>
						</if>

						<if condition="(!empty($data['System'])||!empty($data['Logs'])) eq true">
						<li>
							<a href="#" class="dropdown-toggle">
								<i class="icon-cog"></i>
								<span class="menu-text"> 核心熔炉 </span>

								<b class="arrow icon-angle-down"></b>
							</a>

							<ul class="submenu">
								<if condition="empty($data['System']) eq false">
									<if condition="in_array('admin_index',$data['System']) eq true">
										<li>
											<a href="/index.php/admin/admin/admin_index" target="mframe">
												<i class="icon-double-angle-right"></i>
												议员管理
											</a>
										</li>
									</if>
									<if condition="in_array('role_index',$data['System']) eq true">
										<li>
											<a href="/index.php/admin/role/role_index" target="mframe">
												<i class="icon-double-angle-right"></i>
												保密等级
											</a>
										</li>
									</if>
								</if>
								<if condition="empty($data['Logs']) eq false">
									<if condition="in_array('logs_index',$data['Logs']) eq true">
										<li>
											<a href="/index.php/admin/logs/logs_index" target="mframe">
												<i class="icon-double-angle-right"></i>
												记录中心
											</a>
										</li>
									</if>
								</if>
							</ul>

						</li>
						</if>

					</ul><!-- /.nav-list -->

					<div class="sidebar-collapse" id="sidebar-collapse">
						<i class="icon-double-angle-left" data-icon1="icon-double-angle-left" data-icon2="icon-double-angle-right"></i>
					</div>

					<script type="text/javascript">
						try{ace.settings.check('sidebar' , 'collapsed')}catch(e){}
					</script>
				</div>

				<div class="main-content ">
					<iframe onload="iFrameHeight()" id="iframepage" width="100%" class="yui_content" name="mframe" frameborder="0" src="/index.php/admin/admin/controller"></iframe>
				</div><!-- /.main-content -->

			</div><!-- /.main-container-inner -->

		</div><!-- /.main-container -->

	</body>

	<script>
        function iFrameHeight() {
            var ifm = document.getElementById("iframepage");
            ifm.height=window.innerHeight-50;
        }

        $(function () {
            $('.submenu li').on('click', function () {
                for (i=0;i<$('.submenu li').length;i++){
                    $($('.submenu li')[i]).removeClass('active');
                }
                $(this).addClass('active');
                for (i=0;i<$('.nav-list > li').length;i++){
                    $($('.nav-list > li')[i]).removeClass('active');
                }
                $(this).parent().addClass('active');
            });
        });

	</script>
</html>

